﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.IO;

namespace CuaHangLaptop.DAL
{
    class Connection
    {
        internal static SqlConnection Connection_String()
        {
            //Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Users\Long Khong\Documents\Visual Studio 2010\Projects\CuaHangLaptop\CuaHangLaptop\Database\CuaHangLapTop.mdf";Integrated Security=True;User Instance=True
            string path = Directory.GetCurrentDirectory().ToString();
            SqlConnection conn = new SqlConnection(@"Data Source=.\SQLEXPRESS; 
                                                    AttachDbFilename=C:\Users\Long Khong\Documents\Visual Studio 2010\Projects\CuaHangLaptop\CuaHangLaptop\Database\CuaHangLapTop.mdf;
                                                    Integrated Security=True; Connect Timeout=30; User Instance=True");
            return conn;
        }

        public static string IMG_PATH()
        {
            return Directory.GetCurrentDirectory().ToString() + @"\Images\";
        }
    }
}
